/*
 * Copyright (c) 2025 HiSilicon (Shanghai) Technologies Co., Ltd.
*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef AF_CAPABILITY_MANAGER_H
#define AF_CAPABILITY_MANAGER_H

#include <stdint.h>
#include <stdbool.h>
#include "ot_type.h"
#include "ot_af_common.h"
#include "ss_pdaf.h"
#include "ss_cdaf.h"
#include "ss_daaf.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */

typedef struct {
    td_bool haveRegisteredPdafBf;
    td_bool haveRegisteredCdafBf;
    td_bool haveRegisteredDaafBf;
} AF_CAPABILITY_RegisterInfo;

td_void *AF_CAPABILITY_MANAGER_Init(td_u32 rawPipe);
td_s32 AF_CAPABILITY_MANAGER_Deinit(td_void *handle);

td_s32 AF_CAPABILITY_MANAGER_RegisterCDAFAlg(td_void *handle, OT_AF_CDAFAlgIntf *obj);
td_s32 AF_CAPABILITY_MANAGER_RegistePDAFAlg(td_void *handle, OT_AF_PDAFAlgIntf *obj,
                                            const OT_PDAF_InitParam *pdInitParams);
td_s32 AF_CAPABILITY_MANAGER_RegisterDAAFAlg(td_void *handle, OT_AF_DAAFAlgIntf *obj);

OT_AF_PDAFAlgIntf *AF_CAPABILITY_MANAGER_GetPDAFIntf(td_void *handle);
OT_AF_CDAFAlgIntf *AF_CAPABILITY_MANAGER_GetCDAFIntf(td_void *handle);
OT_AF_DAAFAlgIntf *AF_CAPABILITY_MANAGER_GetDAAFIntf(td_void *handle);
td_void *AF_CAPABILITY_MANAGER_GetPDAFHandle(td_void *handle);
td_void *AF_CAPABILITY_MANAGER_GetCDAFHandle(td_void *handle);
td_void *AF_CAPABILITY_MANAGER_GetDAAFHandle(td_void *handle);
td_s32 AF_CAPABILITY_MANAGER_GetRegisterInfo(td_void *handle, AF_CAPABILITY_RegisterInfo *regInfo);

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif
